PLUME.ELF: bin/main.o bin/coms.o bin/adc.o bin/adcs.o bin/payload.o bin/recovery.o bin/sd.o bin/timing.o bin/log.o bin/i2c.o
	  msp430-gcc bin/main.o bin/coms.o bin/adc.o bin/adcs.o bin/payload.o bin/recovery.o bin/sd.o bin/timing.o bin/log.o bin/i2c.o -mmcu=msp430x1612 -o PLUME.ELF

bin/main.o: main.c
	msp430-gcc main.c -c -mmcu=msp430x1612 -o bin/main.o

bin/coms.o: coms/coms.c
	msp430-gcc coms/coms.c -c -mmcu=msp430x1612 -o bin/coms.o

bin/adc.o: adc/adc_interface.c
	msp430-gcc adc/adc_interface.c -c -mmcu=msp430x1612 -o bin/adc.o

bin/adcs.o: adcs/adcs.c
	msp430-gcc adcs/adcs.c -c -mmcu=msp430x1612 -o bin/adcs.o

bin/payload.o: payload/pay.c
	   msp430-gcc payload/pay.c -c -mmcu=msp430x1612 -o bin/payload.o

bin/recovery.o: recovery/recover.c
	    msp430-gcc recovery/recover.c -c -mmcu=msp430x1612 -o bin/recovery.o

bin/sd.o: sd/sd.c
	msp430-gcc sd/sd.c -c -mmcu=msp430x1612 -o bin/sd.o

bin/timing.o: timing/timing.c
	  msp430-gcc timing/timing.c -c -mmcu=msp430x1612 -o bin/timing.o

bin/log.o: log/log.c
	msp430-gcc log/log.c -c -mmcu=msp430x1612 -o bin/log.o

bin/i2c.o: i2c/i2cinterface.c
	msp430-gcc i2c/i2cinterface.c -c -mmcu=msp430x1612 -o bin/i2c.o

clean:
	rm bin/*.o
	rm PLUME.ELF